<!--#Left-->
<ul class="nav navbar-nav navbar-left">

    %if cname=='new':
    <li class="active"><a href="/new">【最新】</a></li>
    <li class=""><a href="/hot">【最热】</a></li>
    %elif cname=='hot':
    <li class=""><a href="/new">【最新】</a></li>
    <li class="active"><a href="/hot">【最热】</a></li>
    %else:
    <li class=""><a href="/new">【最新】</a></li>
    <li class=""><a href="/hot">【最热】</a></li>
    %end

    %for i in cates:
    %if i['cname']==cname:
    <li class="active"><a href="{{i['url']}}/{{i['id']}}/1">{{i['cname']}}</a></li>
    %else:
    <li class=""><a href="{{i['url']}}/{{i['id']}}/1">{{i['cname']}}</a></li>
    %end
    %end


</ul>
<!--#Rigth-->
<ul class="nav navbar-nav navbar-right">
    %if s and s.get('username'):
    <li class=""><a href="/admin">后台管理</a></li>
    <li class="dropdown">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">
            <font color="">{{s.get('username')}}</font>
            <span class="caret"></span></a>
        <ul class="dropdown-menu">
            <li><a href="#">修改资料</a></li>
            <li><a href="/passwd/update">修改密码</a></li>
            <li role="separator" class="divider"></li>
            <li><a href="/logout">退出</a></li>
        </ul>
    </li>
    %else:
    <li class="active"><a href="/login">登录入口</a></li>

    <!--<form class="navbar-form navbar-right" action="/login" method="post">-->
        <!--<input type="email" class="form-control" placeholder="账号" name="email">-->
        <!--<input type="password" class="form-control" placeholder="密码" name="passwd">-->
        <!--<button type="submit" class="form-control">登陆</button>-->
    <!--</form>-->
    %end
</ul>



